#pragma once
#include <Qt3DRender/qgeometryrenderer.h>
#include <qvector3d.h>
#include <Qt3dRender/qattribute.h>
#include <Qt3dRender/qgeometry.h>
#include <Qt3dRender/qbuffer.h>
using ATTRIBUTE_TYPE = Qt3DRender::QAttribute;
using GEOMETRY_TYPE  = Qt3DRender::QGeometry;
using BUFFER_TYPE    = Qt3DRender::QBuffer;
class QLineMesh : public Qt3DRender::QGeometryRenderer
{
	Q_OBJECT
public:
	ATTRIBUTE_TYPE* m_positionAttribute = nullptr;
	ATTRIBUTE_TYPE* m_indexAttribute    = nullptr;
	BUFFER_TYPE*    m_vertexBuffer      = nullptr;
	BUFFER_TYPE*    m_indexBuffer       = nullptr;
	GEOMETRY_TYPE*  geometry            = nullptr;
public:
	explicit QLineMesh(QVector<QVector3D>& vertices, QVector<unsigned int>& indices, Qt3DCore::QNode* root, PrimitiveType primitiveType);
	~QLineMesh() override;
};

